<?php

namespace maotool\src\test;

use maotool\core\text\password\rule\BirthdayRule;
use maotool\core\text\password\rule\MaxLengthRule;
use maotool\core\text\password\rule\MinLengthRule;
use maotool\core\text\password\rule\LowerLettersRule;
use maotool\core\text\password\rule\SpecialCharRule;
use maotool\core\text\password\rule\UpperLettersRule;
use maotool\core\text\password\rule\WeakRule;
use maotool\util\PasswordUtil;
use PHPUnit\Framework\TestCase;

class PasswordUtilTest extends TestCase
{

    public function testIndex()
    {
        $msg = PasswordUtil::strength(new MinLengthRule(12), new MaxLengthRule(32),
            new LowerLettersRule(1), new UpperLettersRule(1), new SpecialCharRule(1),
            new WeakRule(true))
            ->check("Dj*(@U@*!*gwR(*WQEa");
        var_dump($msg->isSuccess);
        $this->assertTrue(true);
    }

}